interface FetchManagerChatListAPIParams {
  id: string
  page: string
  limit: string
}

interface FetchManagerChatListAPIResData {
  code: number
  msg: string
  time: string
  data: {
    data: Chat[]
    current_page: number
    total: number
    per_page: number
    last_page: number
    class_info: {
      title: string
      images: string
    }
  }
}

/**
 * @description 根据传入的班级 id，分页获取管理员在某个班级中的留言（聊天）列表
 */
export function fetchManagerChatListAPI(params: FetchManagerChatListAPIParams, token: string) {
  return httpInstance.get<FetchManagerChatListAPIResData, FetchManagerChatListAPIParams>(
    '/api/message/managemessagelist',
    { params, headers: { token } },
  )
}
